package com.kefu.chat.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

public class ChatEventMsg {

    @Data
    public static class BaseMsgE {
        private int event_type;
        private long event_time = System.currentTimeMillis();
    }

    /**
     * 客服收到消息type格式 11xx
     */
    @Data
    public static class AdminChatConnectE extends BaseMsgE {
        private int event_type = 1100;
        private String userId;
        private String sessionId;
        private String userName;
        private int channelType;
        private int connectType; //0用户转人工直接进入，1用户排队进入，2客服邀请用户进入，3另外客服转接用户进入，4抢接用户进线
    }

    @Data
    public static class AdminGetMsgE extends BaseMsgE {
        private int event_type = 1101;
        private String userId;
        private String sessionId;
        private String userName;
        private String msgId;
        private int msgType;
        private String msgContent;
        private String fileName;
        private long msgTime;
        private Integer sensitiveFlag; // 敏感词标志 0=无，1=有
        private String sensitiveWords; // 敏感词内容
        private Integer audioDuration;
    }

    @Data
    public static class AdminUserOfflineE extends BaseMsgE {
        private int event_type = 1102;
        private String userId;
        private String sessionId;
    }

    @Data
    public static class AdminUserEvaluated extends BaseMsgE  {
        private int event_type = 1103;
        private String userId;
        private String sessionId;
    }

    @Data
    public static class AdminUserTyping extends BaseMsgE {
        private int event_type = 1104;
        private String userId;
        private String sessionId;
        private String msgContent;
    }

    @Data
    public static class AdminUserGrab extends BaseMsgE {
        private int event_type = 1105;
        private String userId;
        private String sessionId;
    }

    @Data
    public static class AdminTimeout extends BaseMsgE {
        private int event_type = 1106;
        private String userId;
        private String sessionId;
    }

    @Data
    public static class AdminGetConversationMsgE extends BaseMsgE {
        private int event_type = 1107;
        private String conversationId;
        private long msgTime;
        private String sender;
        private String senderName;
        private String msgId;
        private int msgType;
        private String msgContent;
        private String fileName;
        private Integer audioDuration;
    }

    @Data
    public static class AdminGetConversationRecallMsg extends BaseMsgE {
        private int event_type = 1108;
        private String msgId;
        private String conversationId;
    }

    @Data
    public static class AdminGetMsgRead extends BaseMsgE {
        private int event_type = 1109;
        private String userId;
        private String msgId;
        private String sessionId;
    }

    @Data
    public static class AdminVideoInvitationMsg extends BaseMsgE{
        private int event_type = 1110;//客服收到用户发起视频邀请
        private String userId;//用户id
        private String name;
    }

    @Data
    public static class AdminVideoTypeMsg extends BaseMsgE{
        private int event_type = 1111;//客服收到用户发起语音邀请
        private String userId;//用户id
        private String name;
    }

    @Data
    public static class UserChangeMsg extends BaseMsgE {
        private int event_type = 1112; //用户信息变更
        private String userId;
        private String sessionId;
    }


    /**
     * 用户收到消息type格式 12xx
     */
    @Data
    public static class UserChatConnectE extends BaseMsgE {
        private int event_type = 1200;
        private String adminNick;
    }

    @Data
    public static class UserGetMsgE extends BaseMsgE {
        private int event_type = 1201;
        private String adminNick;
        private String msgId;
        private int msgType;
        private String msgContent;
        private String fileName;
        private long msgTime;
        private Integer sensitiveFlag;
        private String sensitiveWords;
        @ApiModelProperty(value = "发送者类型：1用户，2客服，3机器人，4系统")
        private int senderType = 2;
    }

    @Data
    public static class UserOutE extends BaseMsgE {
        private int event_type = 1202;
        private int outType;//0客户结束，1会话超时，2客服结束，3新窗口打开
        private String msgContent;
    }

    @Data
    public static class UserInvitedEvaluate extends BaseMsgE {
        private int event_type = 1203;
    }

    @Data
    public static class UserAdminTyping extends BaseMsgE {
        private int event_type = 1204;
    }

    @Data
    public static class UserGetRecallMsg extends BaseMsgE {
        private int event_type = 1205;
        private String msgId;
    }

    @Data
    public static class UserTimeoutMsg extends BaseMsgE {
        private int event_type = 1206;
        private String msgId;
        private String adminNick;
        private String msgContent;
    }

    @Data
    public static class UserVideoAcceptance extends BaseMsgE{
        private int event_type = 1207; //用户收到客服接受语音视频
        private String aminId;
    }

    @Data
    public static class UserRejectCall extends BaseMsgE{
        private int event_type = 1208; //用户收到客服拒绝语音视频
    }


}
